package com.admin.kotlintest.adapter

import android.support.v4.app.Fragment
import android.support.v4.app.FragmentManager
import android.support.v4.app.FragmentPagerAdapter
import com.admin.kotlintest.fragment.AppiontmentRecordFragment

/**
 * Created by 吴昶 on 2018/4/20.
 */
class TabRecordAdapter(var fragments: ArrayList<AppiontmentRecordFragment>, var titles:MutableList<String>?, fragmentManager: FragmentManager): FragmentPagerAdapter(fragmentManager) {

    override fun getItem(position: Int): Fragment {
        return fragments!![position]
    }

    override fun getCount(): Int {
       return fragments!!.size
    }

    override fun getPageTitle(position: Int): CharSequence {
        return titles!![position]
    }

}